<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>lwIP: src/include/lwip/apps/mdns_priv.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">lwIP
   &#160;<span id="projectnumber">2.1.2</span>
   </div>
   <div id="projectbrief">Lightweight IP stack</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('mdns__priv_8h.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">mdns_priv.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &quot;<a class="el" href="mdns__opts_8h.html">lwip/apps/mdns_opts.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="pbuf_8h.html">lwip/pbuf.h</a>&quot;</code><br />
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a17db69fa887515374452b945e959bbf9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mdns__priv_8h.html#a17db69fa887515374452b945e959bbf9">mdns_domain_add_label</a> (struct mdns_domain *domain, const char *label, u8_t len)</td></tr>
<tr class="separator:a17db69fa887515374452b945e959bbf9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab5f49d9356a76879e0e6a14eb0643b23"><td class="memItemLeft" align="right" valign="top">u16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mdns__priv_8h.html#ab5f49d9356a76879e0e6a14eb0643b23">mdns_readname</a> (struct <a class="el" href="structpbuf.html">pbuf</a> *p, u16_t offset, struct mdns_domain *domain)</td></tr>
<tr class="separator:ab5f49d9356a76879e0e6a14eb0643b23"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a52d8f70432ae998814f16b18431213cd"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mdns__priv_8h.html#a52d8f70432ae998814f16b18431213cd">mdns_domain_eq</a> (struct mdns_domain *a, struct mdns_domain *b)</td></tr>
<tr class="separator:a52d8f70432ae998814f16b18431213cd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab72e48cf076afd1e3a08030d1d0bff9e"><td class="memItemLeft" align="right" valign="top">u16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mdns__priv_8h.html#ab72e48cf076afd1e3a08030d1d0bff9e">mdns_compress_domain</a> (struct <a class="el" href="structpbuf.html">pbuf</a> *<a class="el" href="structpbuf.html">pbuf</a>, u16_t *offset, struct mdns_domain *domain)</td></tr>
<tr class="separator:ab72e48cf076afd1e3a08030d1d0bff9e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>MDNS responder private definitions </p>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="ab72e48cf076afd1e3a08030d1d0bff9e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab72e48cf076afd1e3a08030d1d0bff9e">&#9670;&nbsp;</a></span>mdns_compress_domain()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">u16_t mdns_compress_domain </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structpbuf.html">pbuf</a> *&#160;</td>
          <td class="paramname"><em>pbuf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u16_t *&#160;</td>
          <td class="paramname"><em>offset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct mdns_domain *&#160;</td>
          <td class="paramname"><em>domain</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Return bytes needed to write before jump for best result of compressing supplied domain against domain in outpacket starting at specified offset. If a match is found, offset is updated to where to jump to </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pbuf</td><td>Pointer to pbuf with the partially constructed DNS packet </td></tr>
    <tr><td class="paramname">offset</td><td>Start position of a domain written earlier. If this location is suitable for compression, the pointer is updated to where in the domain to jump to. </td></tr>
    <tr><td class="paramname">domain</td><td>The domain to write </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Number of bytes to write of the new domain before writing a jump to the offset. If compression can not be done against this previous domain name, the full new domain length is returned. </dd></dl>

</div>
</div>
<a id="a17db69fa887515374452b945e959bbf9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a17db69fa887515374452b945e959bbf9">&#9670;&nbsp;</a></span>mdns_domain_add_label()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a> mdns_domain_add_label </td>
          <td>(</td>
          <td class="paramtype">struct mdns_domain *&#160;</td>
          <td class="paramname"><em>domain</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>label</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8_t&#160;</td>
          <td class="paramname"><em>len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Add a label part to a domain </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">domain</td><td>The domain to add a label to </td></tr>
    <tr><td class="paramname">label</td><td>The label to add, like &lt;hostname&gt;, 'local', 'com' or '' </td></tr>
    <tr><td class="paramname">len</td><td>The length of the label </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>ERR_OK on success, an err_t otherwise if label too long </dd></dl>

</div>
</div>
<a id="a52d8f70432ae998814f16b18431213cd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a52d8f70432ae998814f16b18431213cd">&#9670;&nbsp;</a></span>mdns_domain_eq()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int mdns_domain_eq </td>
          <td>(</td>
          <td class="paramtype">struct mdns_domain *&#160;</td>
          <td class="paramname"><em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct mdns_domain *&#160;</td>
          <td class="paramname"><em>b</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Return 1 if contents of domains match (case-insensitive) </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">a</td><td>Domain name to compare 1 </td></tr>
    <tr><td class="paramname">b</td><td>Domain name to compare 2 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>1 if domains are equal ignoring case, 0 otherwise </dd></dl>

</div>
</div>
<a id="ab5f49d9356a76879e0e6a14eb0643b23"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab5f49d9356a76879e0e6a14eb0643b23">&#9670;&nbsp;</a></span>mdns_readname()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">u16_t mdns_readname </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structpbuf.html">pbuf</a> *&#160;</td>
          <td class="paramname"><em>p</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u16_t&#160;</td>
          <td class="paramname"><em>offset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct mdns_domain *&#160;</td>
          <td class="paramname"><em>domain</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Read possibly compressed domain name from packet buffer </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">p</td><td>The packet </td></tr>
    <tr><td class="paramname">offset</td><td>start position of domain name in packet </td></tr>
    <tr><td class="paramname">domain</td><td>The domain name destination </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The new offset after the domain, or MDNS_READNAME_ERROR if reading failed </dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_b0856f6b0d80ccb263b2f415c91f9e17.html">include</a></li><li class="navelem"><a class="el" href="dir_4e6b3cf33a61b6caac9c8ac30c866f37.html">lwip</a></li><li class="navelem"><a class="el" href="dir_f9284811ac594eafdc3134d5f8b945cb.html">apps</a></li><li class="navelem"><a class="el" href="mdns__priv_8h.html">mdns_priv.h</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
  </ul>
</div>
</body>
</html>
